
<%--
 *  File:    YearPlanManagement.jsp
 *  @Author: shigang
 *  Date:    2013/05/31
 *
 *  Copyright (C) 2000 - 2009 Oval Technologies, Inc.
 *  All rights reserved. 
 *
 *  This software is the confidential and proprietary information of Oval 
 *  Technologies, Inc. ("Confidential Information").  You shall not
 *  disclose such Confidential Information and shall use it only in
 *  accordance with the terms of the license agreement you entered into
 *  with Oval.
--%>


<%@ include file="/inc/SessionTimeout.inc"%>
<%@ page language="java" %>     
<%@ page import="java.util.*" %>
<%@ page import="org.apache.log4j.Category" %>

<%@ page contentType = "text/html;charset=UTF-8" %>
<%@ taglib uri="/WEB-INF/PageFlow.tld" prefix="PageFlow" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/oval-tag.tld" prefix="oval" %>
<%@ taglib uri="/WEB-INF/custom.tld" prefix="custom" %>
<%
  //init param
  String strTableName = "v_yearplanmanagent";
  String strModuleName = "COM";
  String privilegeCode = "FP0202";
  String contextPath = request.getContextPath(); 

%>
<%@ include file="/inc/Security.inc" %>
<%@ include file="/inc/FrmDefault.inc" %>
<%@ include file="/inc/PageDefault.inc" %>
<%@ include file="/inc/LocationDefault.inc" %>

<html>
<head>
<title>PlanTypeManagement</title>
<PageFlow:CheckPageFlow pageName="p_yearplanmanagent"/>
<%
	String isNew = "";
	String isDefault = "";
	String paraIsDefault = "";
	//System.out.println("Trace \"isdefault\" ------- summary" + ((String)pageContext.getAttribute("isdefault")));
	if("Y".equals(((String)pageContext.getAttribute("isdefault")))||"Y".equals(request.getParameter("isdefault"))) {
		isDefault = "&isdefault=Y";
		paraIsDefault="Y";
	}else if("N".equals(((String)pageContext.getAttribute("isdefault")))||"Y".equals(request.getParameter("isdefault"))) {
		isDefault = "&isdefault=N";
		paraIsDefault="N";
	}
%>
<meta http-equiv="Content-Type" content="text/html; charset=GB2312">
<link rel="stylesheet" href="<%=contextPath %>/css/<%= strLanguageCode %>/main.css" type="text/css">
<script language="JavaScript" src="<%=contextPath %>/css/<%= strLanguageCode %>/script.js"></script>
<script language="JavaScript" src="<%=contextPath %>/js/FuncLib.js"></script>
<script language="JavaScript" src="<%=contextPath %>/js/ScriptLib.js"></script>
<%@ include file="/inc/SummaryDivision.inc" %>
<%@ include file="/rpt/ReportURL.inc"%>
<script language="JavaScript" src="../../js/SummaryDivision.js"></script>



<%
HashMap CurUserInfo = (HashMap)session.getAttribute("userinfo");
Integer employeeid=(Integer)CurUserInfo.get("userid");
String  isadmin=(String)CurUserInfo.get("isadmin");
if(isadmin==null) isadmin="";
%>
<script language="JavaScript">


function clickRow(id,status,deptdim,regiondim,areadim,usrdim,orgdim,docdim,level1,level2,level3,level4,level5)
{ 
  document.frm.yearplanid.value = id;
  document.frm.status.value = status;
  document.frm.deptdim.value=deptdim;
  document.frm.regiondim.value=regiondim;
  document.frm.areadim.value=areadim;
  document.frm.usrdim.value=usrdim;
  document.frm.orgdim.value=orgdim;
  document.frm.docdim.value=docdim;
  document.frm.level1.value=level1;
  document.frm.level2.value=level2;
  document.frm.level3.value=level3;
  document.frm.level4.value=level4;
  document.frm.level5.value=level5;
 
}
function page_new()
{
	<%isNew = "&isNew=Y";%>
   location.href="YearPlanManagementFrm.jsp?<%= OvalTools.randomURL() %><%=JspHelper.filterNull(isDefault)%><%=JspHelper.filterNull(isNew)%>";
}
function page_delete()
{	
	if(isEmpty(document.frm.yearplanid.value) || document.frm.yearplanid.value == -1)
	{
		return;
	}
    var frm = document.frm;
	if ( ! confirm("<%= message.getMessageDesc("ARE_YOU_SURE") %>") )
		  return;

	
	frm.actionname.value="delete";
	frm.target = "_self";
    isRunning = true;
    frm.submit();
}

function page_BreakUp()
{	
	if(isEmpty(document.frm.yearplanid.value) || document.frm.yearplanid.value == -1)
	{
		return;
	}
	
	
	if(document.frm.status.value !=10)
	{
	   alert("<%= message.getMessageDesc("INPUT_BreakUp_ONLY") %>");
		return;
	}
    var frm = document.frm;
	if ( ! confirm("<%= message.getMessageDesc("ARE_YOU_SURE") %>") )
		  return;

	
	frm.actionname.value="breakup";
	frm.target = "_self";
    isRunning = true;
    frm.submit();
}

function page_edit()
{
	
  var id = document.frm.yearplanid.value;
  
  var editurl;

  if(id == null || id.length == 0 || id == "" || id == "-1")
  {
    alert("<%= message.getMessageDesc("PLEASE_SELECT") %>");
    return;
  }  

	<%isNew = "&isNew=N";%>
    
	editurl = "YearPlanManagementFrm.jsp?<%= OvalTools.randomURL() %><%=JspHelper.filterNull(isDefault)%>&yearplanid=" + id + "&languagecode=" + "<%= strLanguageCode %><%=JspHelper.filterNull(isNew)%>";
	
    self.location.href = editurl;
}
function page_summary(actionvalue,orderbyname)
{
  var editform = summaryPrepare(frm,actionvalue,orderbyname);
  editform.action = "YearPlanManagement.jsp?<%= OvalTools.randomURL() %><%=JspHelper.filterNull(isDefault)%>&languagecode=<%= strLanguageCode %>";
  editform.target = "_self";
  isRunning = true;
  editform.submit();  
}
function page_report(actioncode)
{

var deptdim=document.frm.deptdim.value;
var regiondim=document.frm.regiondim.value;
var areadim=document.frm.areadim.value;
var usrdim=document.frm.usrdim.value;
var orgdim=document.frm.orgdim.value;
var docdim=document.frm.docdim.value;
 
var yearplanid =document.frm.yearplanid.value;
var prodid =document.frm.prodid.value;
var pdgroupid =document.frm.pdgroupid.value;
 
if(eval("document.frm.level"+actioncode).value != 1) {
  alert("该层级下载不包含在计划中!");
  return;
}
if (actioncode==1){ 
 
  if (deptdim==1){
    if(pdgroupid == null || pdgroupid.length == 0 || pdgroupid == "" || pdgroupid == "-1"){
   pdgroupid=null;
  }
   window.open("<%= reportURL %>/servlet/ExcecuteReport/deptyearplan.sox?__format=xlsx&__folder=/ovalreport&employeeid="+<%=CurUserInfo.get("userid") %>+"&planid=" +yearplanid+"&prodid=" +pdgroupid );
  }else if(deptdim==2){
  if(prodid == null || prodid.length == 0 || prodid == "" || prodid == "-1"){
    prodid=null;
  }
   window.open("<%= reportURL %>/servlet/ExcecuteReport/deptyearplan.sox?__format=xlsx&__folder=/ovalreport&employeeid="+<%=CurUserInfo.get("userid") %>+"&planid=" +yearplanid+"&prodid=" +prodid );
 
  } else {
  
  window.open("<%= reportURL %>/servlet/ExcecuteReport/deptyearplan.sox?__format=xlsx&__folder=/ovalreport&employeeid="+<%=CurUserInfo.get("userid") %>+"&planid=" +yearplanid +"&prodid=-1");
 
  }
}

if (actioncode==2){ 
  
  if (regiondim==1){
    if(pdgroupid == null || pdgroupid.length == 0 || pdgroupid == "" || pdgroupid == "-1"){
   pdgroupid=null;
  }
  window.open("<%= reportURL %>/servlet/ExcecuteReport/regionyearplan.sox?__format=xlsx&__folder=/ovalreport&employeeid="+<%=CurUserInfo.get("userid") %>+"&planid=" +yearplanid+"&prodid=" +pdgroupid );
 
  }else if(regiondim==2){
  if(prodid == null || prodid.length == 0 || prodid == "" || prodid == "-1"){
    prodid=null;
  }
  window.open("<%= reportURL %>/servlet/ExcecuteReport/regionyearplan.sox?__format=xlsx&__folder=/ovalreport&employeeid="+<%=CurUserInfo.get("userid") %>+"&planid=" +yearplanid+"&prodid=" +prodid );
 
  } else {   
  window.open("<%= reportURL %>/servlet/ExcecuteReport/regionyearplan.sox?__format=xlsx&__folder=/ovalreport&employeeid="+<%=CurUserInfo.get("userid") %>+"&planid=" +yearplanid +"&prodid=-1");
 
  }
}


if (actioncode==3){ 
  if (areadim==1){
    if(pdgroupid == null || pdgroupid.length == 0 || pdgroupid == "" || pdgroupid == "-1"){
   pdgroupid=null;
  }
  window.open("<%= reportURL %>/servlet/ExcecuteReport/areayearplan.sox?__format=xlsx&__folder=/ovalreport&employeeid="+<%=CurUserInfo.get("userid") %>+"&planid=" +yearplanid+"&prodid=" +pdgroupid );
 
  }else if(areadim==2){
   if(prodid == null || prodid.length == 0 || prodid == "" || prodid == "-1"){
    prodid=null;
  }
  window.open("<%= reportURL %>/servlet/ExcecuteReport/areayearplan.sox?__format=xlsx&__folder=/ovalreport&employeeid="+<%=CurUserInfo.get("userid") %>+"&planid=" +yearplanid+"&prodid=" +prodid );
 
  } else {
  window.open("<%= reportURL %>/servlet/ExcecuteReport/areayearplan.sox?__format=xlsx&__folder=/ovalreport&employeeid="+<%=CurUserInfo.get("userid") %>+"&planid=" +yearplanid +"&prodid=-1");
 }
}

if (actioncode==4){ 
  
  
  
  if (usrdim==1){
     if(pdgroupid == null || pdgroupid.length == 0 || pdgroupid == "" || pdgroupid == "-1"){
   pdgroupid=null;
  }
  window.open("<%= reportURL %>/servlet/ExcecuteReport/salesrepyearplan.sox?__format=xlsx&__folder=/ovalreport&employeeid="+<%=CurUserInfo.get("userid") %>+"&planid=" +yearplanid+"&prodid=" +pdgroupid);
 
  }else if(usrdim==2){
  
  if(prodid == null || prodid.length == 0 || prodid == "" || prodid == "-1"){
    prodid=null;
  }
  window.open("<%= reportURL %>/servlet/ExcecuteReport/salesrepyearplan.sox?__format=xlsx&__folder=/ovalreport&employeeid="+<%=CurUserInfo.get("userid") %>+"&planid=" +yearplanid+"&prodid=" +prodid);
 
  } else {
  window.open("<%= reportURL %>/servlet/ExcecuteReport/salesrepyearplan.sox?__format=xlsx&__folder=/ovalreport&employeeid="+<%=CurUserInfo.get("userid") %>+"&planid=" +yearplanid+"&prodid=-1");
 }
}


if (actioncode==5){ 
  
  
  if (orgdim==1){
    if(pdgroupid == null || pdgroupid.length == 0 || pdgroupid == "" || pdgroupid == "-1"){
   pdgroupid=null;
  }
  window.open("<%= reportURL %>/servlet/ExcecuteReport/customeryearplan.sox?__format=xlsx&__folder=/ovalreport&employeeid="+<%=CurUserInfo.get("userid") %>+"&planid=" +yearplanid+"&prodid="+pdgroupid);
 
  }else if(orgdim==2){
 if(prodid == null || prodid.length == 0 || prodid == "" || prodid == "-1"){
    prodid=null;
  }
  window.open("<%= reportURL %>/servlet/ExcecuteReport/customeryearplan.sox?__format=xlsx&__folder=/ovalreport&employeeid="+<%=CurUserInfo.get("userid") %>+"&planid=" +yearplanid+"&prodid="+prodid);
 
  } else {
 window.open("<%= reportURL %>/servlet/ExcecuteReport/customeryearplan.sox?__format=xlsx&__folder=/ovalreport&employeeid="+<%=CurUserInfo.get("userid") %>+"&planid=" +yearplanid+"&prodid=-1");
  }
}


if (actioncode==6){ 
 
 
  if (docdim==1){
    if(pdgroupid == null || pdgroupid.length == 0 || pdgroupid == "" || pdgroupid == "-1"){
   pdgroupid=null;
  }
  window.open("<%= reportURL %>/servlet/ExcecuteReport/doctoryearplan.sox?__format=xlsx&__folder=/ovalreport&employeeid="+<%=CurUserInfo.get("userid") %>+"&planid=" +yearplanid+"&prodid="+prodid);
 
  }else if(docdim==2){
  if(prodid == null || prodid.length == 0 || prodid == "" || prodid == "-1"){
    prodid=null;
  }
  window.open("<%= reportURL %>/servlet/ExcecuteReport/doctoryearplan.sox?__format=xlsx&__folder=/ovalreport&employeeid="+<%=CurUserInfo.get("userid") %>+"&planid=" +yearplanid+"&prodid="+prodid);
 
  } else {
  window.open("<%= reportURL %>/servlet/ExcecuteReport/doctoryearplan.sox?__format=xlsx&__folder=/ovalreport&employeeid="+<%=CurUserInfo.get("userid") %>+"&planid=" +yearplanid+"&prodid=-1");
 }
}

}
function page_selectProd() {
        var status = "height=400, width=600,top=100,left=100,toolbar=no, menubar=no, scrollbars=yes, resizable=no, location=no, status=no";
		var url = "<%=contextPath%>/phap/phap.datp/masterdata/kdm/ProductSelect.jsp?o_thread=" + Math.random();
		 
		if (typeof popwindow != 'undefined') popwindow.close();
		popwindow = window.open(url, "newwindow", status);
	}
function page_setproduct(id,umcode,prodcode,prodname){
		document.frm.prodid.value=id;
		document.frm.prodname.value=prodname;
		document.frm.prodcode.value=prodcode;
	}
function popContactProd(){
    
    if(popwindow!=null) popwindow.close();
 	popwindow = window.open("<%=contextPath%>/masterdata/ogm/ProductbrandPopWindow.jsp?<%= OvalTools.randomURL() %>&zyldatacategory="+document.frm.datacategory.value, "newwindow", "height=400, width=600,top=100,left=100,toolbar=no, menubar=no, scrollbars=yes, resizable=no, location=no, status=yes")

}
function set_orgNameByPopWindow(id,code,name){
    
	document.frm.pdgroupname.value=name;
	 
	document.frm.pdgroupid.value=id;
    
}
</script>
</head>
<body>

<form name="frm" method="post" action="<%=contextPath %>/Dispatcher">
<%@ include file="/inc/PageLocation.inc" %>
<table width="100%" cellspacing="0" cellpadding="0" border="0">
   
      <input type="hidden" name="pagename" value="p_yearplanmanagent">
      <input type="hidden" name="currentnum">
      <input type="hidden" name="actionname">   
      <input type="hidden" name="datacategory" value="25">
      <input type="hidden" name="category" value="1">
      <input type="hidden" name="isdefault" value="<%= paraIsDefault %>">   
  <tr> 
    <td> 
      <table width="100%" border="0" cellspacing="0">
        <tr> 
          <td class="summary_top" colspan="3" ></td>
        </tr>
        <tr>
          <td>    
	 <table border="0" cellspacing="0">    
            <%--@ include file="/inc/SummarySearch.inc" --%>  
            
      <tr> 
    	<td valign="top"> 
    		<table border="0" cellspacing="0">  
    		  
            	<%@ include file="/inc/SummarySearch.inc" %>  
            	
            </table>
            <table border="0" cellspacing="0">  
             <tr> <td class="title_center"><%= label.getLabelName("L_Product")+ label.getLabelName("L_Colon") %><custom:text
					property="prodname" readonly="true" size="26" /> <a
					onclick="javascript:page_selectProd();"><custom:button type="3"
					label="L_Asterisk" imgsrc="flash.gif" border="0" /></a> <custom:hidden
					property="prodid" /> <custom:hidden property="prodcode" /></td>	
			<td class="title_center">
			<div align="right">
				<%=label.getLabelName("L_ProductGroupName")+label.getLabelName("L_Colon")%>
			</div>
		   </td>	
		   <td>
			<custom:text property="pdgroupname" size="15"  ></custom:text>
			<a onclick="popContactProd();"><custom:button type="3" label="L_Asterisk" imgsrc="flash.gif" border="0" /></a>
			<custom:hidden  property="pdgroupid" />
			 </a>
		   </td>		
					</tr>
             </table>
        </td>
        
   	</tr>
  </table>
            
          </td>
        </tr>
      </table>
    </td>
  </tr>
  <tr> 
    <td> 
      <table border="1" cellspacing="0" bordercolorlight="#999999" bordercolordark="#FFFFFF" cellpadding="0" width="100%">
          <tr class="deepblue-left">
			<td  class="title_center">&nbsp;</td>
            <td  class="title_center"><%= label.getLabelName("L_plane_code")%></td>
            <td  class="title_center"><%= label.getLabelName("L_PlanName")%></td>
            <td  class="title_center"><%= label.getLabelName("L_Year1")%></td>
            <td  class="title_center"><%= label.getLabelName("L_PlanType")%></td>
            <td  class="title_center"><%= label.getLabelName("L_ReportSwitch")%></td>
            <td  class="title_center"><%= label.getLabelName("L_Status")%></td>
		</tr>

          <%
             Vector yearplanmanagent1  = (Vector)pageContext.getAttribute("yearplanmanagent");
             HashMap reprotSwitchinfo = (HashMap)pageContext.getAttribute("depthash7");
             if(yearplanmanagent1  == null)
             {
            	 yearplanmanagent1  = new Vector();
             }
             
            
             String strClassType = new String("");   
             Integer nDefaultId = null;             
             Integer nDefaultdept = null;     
             Integer nDefaultregion = null;   
             Integer nDefaultarea = null;   
             Integer nDefaultusr = null;   
             Integer nDefaultorg = null;   
             Integer nDefaultdoc = null;   
             Integer nDefaultStatus = null;
             Integer nDefaultVersion = new Integer(-1);
             
             Integer nDefaultLevel1 = null;
             Integer nDefaultLevel2 = null;
             Integer nDefaultLevel3 = null;
             Integer nDefaultLevel4 = null;
             Integer nDefaultLevel5 = null;
             int i=0;
             String strChecked = "";
             boolean bHasChecked = false;
          %>   
          <logic:iterate id="yearplanmanagent" collection="<%= yearplanmanagent1 %>"   >
          <%
            if(i%2 == 1)
            {
              strClassType = "td-listrom";
            }else{                    
              strClassType = "none";
            }
            if(!bHasChecked)
            {
              nDefaultId = (Integer)(((HashMap)pageContext.getAttribute("yearplanmanagent")).get("yearplanid"));
              nDefaultStatus = (Integer)(((HashMap)pageContext.getAttribute("yearplanmanagent")).get("status"));
              
              if (((HashMap)pageContext.getAttribute("yearplanmanagent")).get("deptdim")!=null){
            	
            	nDefaultdept=(Integer)(((HashMap)pageContext.getAttribute("yearplanmanagent")).get("deptdim"));
            }  
       if (((HashMap)pageContext.getAttribute("yearplanmanagent")).get("regiondim")!=null){
            	
        	   nDefaultregion=(Integer)(((HashMap)pageContext.getAttribute("yearplanmanagent")).get("regiondim"));
            }
           if (((HashMap)pageContext.getAttribute("yearplanmanagent")).get("areadim")!=null){
           	
        	   nDefaultarea=(Integer)(((HashMap)pageContext.getAttribute("yearplanmanagent")).get("areadim"));
           }
           if (((HashMap)pageContext.getAttribute("yearplanmanagent")).get("usrdim")!=null){
              	
        	   nDefaultusr=(Integer)(((HashMap)pageContext.getAttribute("yearplanmanagent")).get("usrdim"));
              }
           if (((HashMap)pageContext.getAttribute("yearplanmanagent")).get("orgdim")!=null){
              	
        	   nDefaultorg=(Integer)(((HashMap)pageContext.getAttribute("yearplanmanagent")).get("orgdim"));
              }
           if (((HashMap)pageContext.getAttribute("yearplanmanagent")).get("docdim")!=null){
             	
        	   nDefaultdoc=(Integer)(((HashMap)pageContext.getAttribute("yearplanmanagent")).get("docdim"));
             }
           if (((HashMap)pageContext.getAttribute("yearplanmanagent")).get("level1")!=null){
            	
        	   nDefaultLevel1=(Integer)(((HashMap)pageContext.getAttribute("yearplanmanagent")).get("level1"));
             }
           if (((HashMap)pageContext.getAttribute("yearplanmanagent")).get("level2")!=null){
           	
        	   nDefaultLevel2=(Integer)(((HashMap)pageContext.getAttribute("yearplanmanagent")).get("level2"));
             }
           if (((HashMap)pageContext.getAttribute("yearplanmanagent")).get("level3")!=null){
           	
        	   nDefaultLevel3=(Integer)(((HashMap)pageContext.getAttribute("yearplanmanagent")).get("level3"));
             }
           if (((HashMap)pageContext.getAttribute("yearplanmanagent")).get("level4")!=null){
           	
        	   nDefaultLevel4=(Integer)(((HashMap)pageContext.getAttribute("yearplanmanagent")).get("level4"));
             }
           if (((HashMap)pageContext.getAttribute("yearplanmanagent")).get("level5")!=null){
           	
        	   nDefaultLevel5=(Integer)(((HashMap)pageContext.getAttribute("yearplanmanagent")).get("level5"));
             }
           /*  */
      
             //nDefaultStatus = (Integer)((HashMap)pageContext.getAttribute("yearplanmanagent")).get("status");
              
              bHasChecked = true;
              strChecked = "Checked";
            }
            else
            {
              strChecked = "";
            }
            i++;
          %>            
          <tr onMouseOver="this.className='tr-over'" onMouseOut="this.className='<%=JspHelper.filterNull( strClassType )%>'"  onClick="radiotrue('yearplanid<%=JspHelper.filterNull( i )%>');
			    javascript:clickRow('<oval:write name="yearplanmanagent" property="yearplanid" />',
			                        '<oval:write name="yearplanmanagent" property="status" />','<oval:write name="yearplanmanagent" property="deptdim" />',
'<oval:write name="yearplanmanagent" property="regiondim" />',
'<oval:write name="yearplanmanagent" property="areadim" />',
'<oval:write name="yearplanmanagent" property="usrdim"/>',
'<oval:write name="yearplanmanagent" property="orgdim"/>',
'<oval:write name="yearplanmanagent" property="docdim"/>',
'<oval:write name="yearplanmanagent" property="level1"/>',
'<oval:write name="yearplanmanagent" property="level2"/>',
'<oval:write name="yearplanmanagent" property="level3"/>',
'<oval:write name="yearplanmanagent" property="level4"/>',
'<oval:write name="yearplanmanagent" property="level5"/>'
);"
          class="<%=JspHelper.filterNull( strClassType )%>"> 
            <td> 
              <input <%=JspHelper.filterNull( strChecked )%> id="yearplanid<%=JspHelper.filterNull( i )%>" type="radio" name="order" value="<oval:write name="yearplanmanagent" property="yearplanid"/>" class="normalradio"/>
            </td>       
            <td class="hand"><a href="YearPlanManagementFrm.jsp?<%= OvalTools.randomURL() %><%=JspHelper.filterNull(isDefault)%>&viewflag=view&yearplanid=<custom:write name="yearplanmanagent" property="yearplanid"/>"><custom:write name="yearplanmanagent" property="yearplancode" nbsp="true"/></a></td>
           <td><custom:write name="yearplanmanagent" property="yearplanname" nbsp="true"/></td>
            <td><custom:write name="yearplanmanagent" property="year" nbsp="true"/></td>
            <td><custom:write name="yearplanmanagent" property="plantypename" nbsp="true"/></td>
             
             <td style="background:#FFFFE0;">
            
            <%
            
            if(((HashMap)pageContext.getAttribute("yearplanmanagent")).get("yearplanid")!=null){
  			  OvalDictionary dic=new OvalDictionary("cn");        
	  		
					
					

					if(((Integer)((HashMap)pageContext.getAttribute("yearplanmanagent")).get("level1")).intValue()==1) {
						%>
						<custom:checkbox property="plan1num" disabled="true" name="yearplanmanagent" styleClass="checkbox" checkFlag="Y/N" /><%=dic.getDictionaryValueName("PlanLevel","1") %>
						<% 
					}
					if(((Integer)((HashMap)pageContext.getAttribute("yearplanmanagent")).get("level2")).intValue()==1) {
						%>
						<custom:checkbox property="plan2num" disabled="true" name="yearplanmanagent" styleClass="checkbox" checkFlag="Y/N" /><%=dic.getDictionaryValueName("PlanLevel","2") %>
						<% 
					}
					if(((Integer)((HashMap)pageContext.getAttribute("yearplanmanagent")).get("level3")).intValue()==1) {
						%>
						<custom:checkbox property="plan3num" disabled="true" name="yearplanmanagent" styleClass="checkbox" checkFlag="Y/N" /><%=dic.getDictionaryValueName("PlanLevel","3") %>
						<% 
					}
					if(((Integer)((HashMap)pageContext.getAttribute("yearplanmanagent")).get("level4")).intValue()==1) {
						%>
						<custom:checkbox property="plan4num" disabled="true" name="yearplanmanagent" styleClass="checkbox" checkFlag="Y/N" /><%=dic.getDictionaryValueName("PlanLevel","4") %>
						<% 
					}
					if(((Integer)((HashMap)pageContext.getAttribute("yearplanmanagent")).get("level5")).intValue()==1) {
						%>
						<custom:checkbox property="plan5num" disabled="true" name="yearplanmanagent" styleClass="checkbox" checkFlag="Y/N" /><%=dic.getDictionaryValueName("PlanLevel","5") %>
						<% 
					}
					
					
				
				
				
				
            }
					
					
					%>
            
            
            </td>
            <td><custom:write name="yearplanmanagent" property="statusname" nbsp="true"/></td>
         
          </tr>
          </logic:iterate> 
        <%
            String history=(String)pageContext.getAttribute("history");
        %> 
 
          <input type="hidden" name="deptdim" value="<%=JspHelper.filterNull(nDefaultdept)%>"/>
          <input type="hidden" name="regiondim" value="<%=JspHelper.filterNull(nDefaultregion )%>"/>
          <input type="hidden" name="areadim" value="<%=JspHelper.filterNull(nDefaultarea )%>"/>
          <input type="hidden" name="usrdim" value="<%=JspHelper.filterNull(nDefaultusr)%>"/>
          <input type="hidden" name="orgdim" value="<%=JspHelper.filterNull(nDefaultorg )%>"/>
          <input type="hidden" name="docdim" value="<%=JspHelper.filterNull(nDefaultdoc)%>"/>
          <input type="hidden" name="yearplanid" value="<%=JspHelper.filterNull( nDefaultId )%>"/>
          <input type="hidden" name="status" value="<%=JspHelper.filterNull( nDefaultStatus )%>"/>
          
          <input type="hidden" name="level1" value="<%=JspHelper.filterNull( nDefaultLevel1 )%>"/>
          <input type="hidden" name="level2" value="<%=JspHelper.filterNull( nDefaultLevel2 )%>"/>
          <input type="hidden" name="level3" value="<%=JspHelper.filterNull( nDefaultLevel3 )%>"/>
          <input type="hidden" name="level4" value="<%=JspHelper.filterNull( nDefaultLevel4 )%>"/>
          <input type="hidden" name="level5" value="<%=JspHelper.filterNull( nDefaultLevel5 )%>"/>
        
        <%@ include file="/inc/SummaryAction.inc" %>
      </table>
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td class="summary_top" ></td>
        </tr>
        <tr>
        
          <td class="td_center">

              <a onclick="page_new()"><custom:button type="1" label="L_New" imgsrc="new.gif" border="0" style="width:60" privilegeCode="FP0202_NEW"/></a>

              <a onclick="page_edit()"><custom:button type="1" label="L_Edit" imgsrc="edit.gif" border="0" style="width:60" privilegeCode="FP0202_EDIT"/></a>
              
              <a onclick="page_delete()"><custom:button type="1" label="L_Delete" imgsrc="delete.gif" border="0" style="width:60" privilegeCode="FP0202_DELETE"/></a>

              <a onclick="page_BreakUp()"><custom:button type="1" label="L_BreakUp" imgsrc="delete.gif" border="0" style="width:60" privilegeCode="FP0202_BREAKUP"/></a>
          </td>
                   

        </tr>
        
        
         <tr>
			         
			<td class="td_center">

				   <%OvalDictionary dic=new OvalDictionary("cn"); 
                    //dic.getDictionaryValueName("PlanLevel",1);
                    //out.print(dic.getDictionaryValueName("PlanLevel","1"));
                    if (yearplanmanagent1.size()!=0 ){
                  %>
                  <a onclick="page_report(1)"><custom:button type="1" value="<%=dic.getDictionaryValueName("PlanLevel","1")+"计划下载" %>" imgsrc="new.gif" border="0" style="width:80" privilegeCode="FP0202_REPORT1"/></a>
                  <a onclick="page_report(2)"><custom:button type="1" value="<%=dic.getDictionaryValueName("PlanLevel","2")+"计划下载"  %>" imgsrc="new.gif" border="0" style="width:80" privilegeCode="FP0202_REPORT2"/></a>  
                  <a onclick="page_report(3)"><custom:button type="1" value="<%=dic.getDictionaryValueName("PlanLevel","3")+"计划下载"  %>" imgsrc="new.gif" border="0" style="width:80" privilegeCode="FP0202_REPORT3"/></a>
		          <a onclick="page_report(4)"><custom:button type="1" label="L_SalesrepPlanDownload" imgsrc="new.gif" border="0" style="width:80" privilegeCode="FP0202_REPORT4"/></a>
                  <a onclick="page_report(5)"><custom:button type="1" label="L_CustomerPlanDownload" imgsrc="new.gif" border="0" style="width:80" privilegeCode="FP0202_REPORT5"/></a>
         <% }%>
          </td>
          

        </tr>
        
      </table>
    </td>
  </tr>

</table>
 </form>
</body>
</html>
